<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<!-- start: HEAD -->
<head>
    <title>四川旅游学院统一后台管理系统</title>
    <meta charset="utf-8"/>
    <meta http-equiv='X-UA-Compatible' content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="" name="description"/>
    <meta content="" name="author"/>


    <!-- bootstrap 及 bootstrap拓展 -->
    <link rel="stylesheet" href="/resources/plugins/bootstrap-3.3.5-dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/resources/plugins/bootstrap-3.3.5-dist/css/bootstrap-expand.css"/>


    <!-- bootstrap 摸态框 -->
    <link rel="stylesheet" href="/resources/plugins/bootstrap-modal/css/bootstrap-modal.css"/>
    <link rel="stylesheet" href="/resources/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css"/>


    <!-- 日期插件 -->
    <link rel="stylesheet"
          href="/resources/plugins/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css"/>


    <!-- Font Awesome 图标字体 -->
    <link rel="stylesheet" href="/resources/plugins/font-awesome/css/font-awesome.min.css"/>


    <!-- iCheck 多选/单选插件 -->
    <link rel="stylesheet" href="/resources/plugins/iCheck/skins/all.css"/>
    <!-- magic-input 多选/单选插件 -->
    <link rel="stylesheet" href="/resources/plugins/magic-input/dist/magic-input.min.css"/>


    <!-- perfect-scrollbar 自定义滚动条 -->
    <link rel="stylesheet" href="/resources/plugins/perfect-scrollbar/src/perfect-scrollbar.css"/>


    <!-- animate css3动画 -->
    <link rel="stylesheet" href="/resources/plugins/animate.css/animate.min.css"/>


    <!-- animate css3动画 -->
    <link rel="stylesheet" href="/resources/plugins/select2-master/dist/css/select2.min.css"/>
    <link rel="stylesheet" href="/resources/plugins/select2-bootstrap/dist/select2-bootstrap.css"/>


    <!-- 表单验证 -->
    <link rel="stylesheet"
          href="/resources/plugins/jQuery-Validation-Engine-master/css/validationEngine.jquery.css"/>


    <!-- sweetalert 弹出框 -->
    <link rel="stylesheet" href="/resources/plugins/sweetalert-0.5.x/lib/sweet-alert.css"/>


    <!-- 图片预览 -->
    <link rel="stylesheet" href="/resources/plugins/viewer-master/dist/viewer.css"/>


    <!-- 通知插件 -->
    <link rel="stylesheet" href="/resources/plugins/toastr/toastr.min.css"/>


    <!--[if lt IE 10]>
    <link rel="stylesheet" href="/resources/plugins/uploadify/uploadify.css"/>
    <![endif]-->
    <!--[if gte IE 10]><!-->
    <link rel="stylesheet" href="/resources/plugins/uploadifive/uploadifive.css"/>
    <!--<![endif]-->


    <!-- start: 框架 css -->
    <link rel="stylesheet" href="/resources/css/styles.css"/>
    <link rel="stylesheet" href="/resources/css/styles-responsive.css"/>
    <link rel="stylesheet" href="/resources/css/plugins.css"/>
    <link rel="stylesheet" href="/resources/css/themes/theme-default.css" type="text/css" id="skin_color"/>
    <link rel="stylesheet" href="/resources/css/print.css" type="text/css" media="print"/>
    <link rel="stylesheet" href="/resources/css/quick-layout.css"/>
    <!-- end: 框架 css -->

    <!--[if lt IE 9]>
    <script src="/resources/plugins/jQuery/jquery-1.11.1.min.js"></script>
    <script src="/resources/plugins/respond.min.js"></script>
    <script src="/resources/plugins/excanvas.min.js"></script>
    <link rel="stylesheet" href="/resources/css/ie8-patch.css">
    <![endif]-->

    <!--[if lt IE 10]>
    <link rel="stylesheet" href="/resources/css/ie9-patch.css">
    <![endif]-->
    <!--[if gte IE 9]><!-->
    <script src="/resources/plugins/jQuery/jquery-2.1.1.min.js"></script>
    <!--<![endif]-->


    <link rel="stylesheet" href="/resources/css/tabModels.css">

    <script>
        var basePath = '';
        var nodePath = '';
        var stageMenu = true;//分阶段菜单
        var tabModel = true;//是否启用Tab页
        var showAllStageMenu = false;//只显示有菜单的阶段菜单
        var showAllLeftStageMenu = false;//只显示有菜单的阶段菜单
    </script>
</head>
<!-- end: HEAD -->

<body class="single-page">
<!--[if lt IE 10]>
<script>
    //如果低于IE8版本,跳转到兼容性提示页面
    $.get('/jr/index.jsp', function (data) {
        $('body:first').html($(data));
    });
</script>
<![endif]-->

<input type="hidden" id="menuid_manage" name="menuid_manage" value=""/>
<input type="hidden" id="updepartid_manage" name="updepartid_manage" value="230000420"/>
<!-- end:  滑动层 上 -->
<div class="main-wrapper">
    <div class="topbar navbar navbar-inverse navbar-fixed-top inner">
        <!-- start: 顶部容器 -->
        <div class="container">
            <div class="navbar-header">
                <a class="sb-toggle-left hidden-md hidden-lg hidden-xl hidden-xxl hidden-xxxl" href="#main-navbar">
                    <i class="fa fa-bars"></i>
                </a>
                <!-- start: LOGO -->
                <a class="navbar-brand" href="/">
                    <p>四川旅游学院统一后台管理系统</p>
                </a>
                <!-- end: LOGO -->
            </div>
            <div class="topbar-tools">

                <!-- start: 顶部菜单 -->
                <ul class="nav navbar-right">
                    <!-- start: 用户下拉选项 -->
                    <li class="dropdown current-user">
                        <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" data-close-others="true"
                           href="javascript:void(0)" id="times_login">

                        </a>
                    </li>
                    <li class="dropdown current-user">
                        <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" data-close-others="true"
                           href="javascript:void(0)">
                            <span class="username">陈功锁</span> <i class="fa fa-caret-down "></i>
                        </a>
                        <ul class="dropdown-menu dropdown-dark" id="changerole">
                            <li>
                                <a href="javascript:void(0)" class="home-btn" data-localize="jdframe.b">个人中心</a>
                            </li>
                            <li>
                                <a href="javascript:void(0)" class="visible-xs-block" data-localize="jdframe.a"
                                   onclick="execLogout()">退出</a>
                            </li>
                        </ul>
                    </li>
                    <li>

                    </li>
                    <li class="dropdown current-user hidden-xs">
                        <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" data-close-others="true"
                           href="javascript:void(0)" onclick="execLogout()">
                            <span class="username" data-localize="jdframe.a">退出</span>
                        </a>
                    </li>
                    <!-- end: 用户下拉选项 -->

                </ul>
                <!-- end: 顶部菜单 -->
            </div>
        </div>
        <!-- end: 顶部容器 -->
    </div>
    <!-- start:  滑动层 左️ -->
    <a class="closedbar inner hidden-sm hidden-xs" href="javascript:void(0)">
    </a>
    <nav id="pageslide-left" class="pageslide inner">
        <div class="navbar-content" style="height: 370px;">
            <div class="user-profile border-top padding-horizontal-10 block">
                <div class="row">
                    <div class="col-xs-10 no-stage-menu" style="display: none;">
                        <div class="btn-group stage-menu-btn-group">
                            <a href="javascript:void(0)" class="btn dropdown-toggle p0 home-btn"><i
                                    class="fa fa-home pr10 stage-menu-i"></i>个人中心</a>
                        </div>
                    </div>
                    <div class="col-xs-10 stage-menu-box">
                        <div class="btn-group stage-menu-btn-group open">
                            <a href="javascript:void(0)" data-toggle="dropdown" class="btn dropdown-toggle p0"
                               aria-expanded="true"><i class="fa fa-home pr10 stage-menu-i"></i>个人中心</a>
                            <ul class="dropdown-menu" role="menu"></ul>
                        </div>
                    </div>

                    <div class="col-xs-2 sb-toggle">
                        <a class="btn btn-sm user-options sb_toggle sb-toggle-left">
                            <i class="fa fa-ellipsis-v"></i>
                        </a>
                    </div>
                </div>
            </div>
            <div class="main-navigation left-wrapper transition-left ps-container" style="height: 280px;">
                <!-- start: 菜单 -->
                <ul class="main-navigation-menu">

                </ul>
                <!-- end: 菜单 -->
                <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px; width: 219px; display: none;">
                    <div class="ps-scrollbar-x" style="left: 0px; width: 0px;"></div>
                </div>
                <div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 280px; display: inherit;">
                    <div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div>
                </div>
            </div>
        </div>
        <div class="slide-tools">
            <div class="col-xs-6 text-left no-padding">
                <a class="btn btn-sm status" href="javascript:void(0)">
                    <font data-localize="jdframe.c">状态</font> <i class="fa fa-dot-circle-o text-green"></i> <span
                        data-localize="jdframe.d">在线</span>
                </a>
            </div>
            <div class="col-xs-6 text-right no-padding">


            </div>
        </div>
    </nav>
    <!-- end: 滑动层 左 -->

    <!-- start: 主体内容 -->
    <div class="main-container inner">
        <!-- start: 页面 -->
        <div class="main-content">
            <div class="container pl0 pr10">
                <!-- start: 页面标题 -->
                <!-- start: 工具 -->
                <div id="toolbar" class="toolbar">
                    <div class="col-xs-10">
                        <div id="stage-menu" class="page-header"></div>
                    </div>
                    <div class="col-xs-2">
                        <a href="javascript:void(0)" class="back-subviews">
                            <i class="fa fa-chevron-left"></i> 返回
                        </a>
                        <a href="javascript:void(0)" class="close-subviews">
                            <i class="fa fa-times"></i> 关闭
                        </a>

                        <div class="toolbar-tools pull-right">
                            <!-- start: 顶部常用功能&消息 -->
                            <ul class="nav navbar-right"></ul>
                            <!-- end: 顶部常用功能&消息 -->
                        </div>
                    </div>
                </div>
                <!-- end: 工具 -->
                <!-- end: 页面标题 -->

                <!-- str: tab开始 -->
                <div class="content-tabs">
                    <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i></button>
                    <nav class="page-tabs J_menuTabs">
                        <div class="page-tabs-content"></div>
                    </nav>
                    <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
                    <div class="btn-group roll-nav roll-right">
                        <button class="dropdown J_tabClose" data-toggle="dropdown"><font
                                data-localize="frame_button.choose">关闭操作</font><span class="caret"></span>
                        </button>
                        <ul role="menu" class="dropdown-menu dropdown-menu-right">
                            <li class="J_tabShowActive"><a data-localize="frame_button.fixed">定位当前选项卡</a>
                            </li>
                            <li class="divider"></li>
                            <li class="J_tabCloseAll"><a data-localize="frame_button.closeall">关闭全部选项卡</a>
                            </li>
                            <li class="J_tabCloseOther"><a data-localize="frame_button.closeother">关闭其他选项卡</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <!-- str: 结束 -->

                <!-- start: ajax 容器 -->
                <div class="J_mainContent" id="content-main"></div>
                <div id="ajax-content" class="animated"></div>
                <!-- end: ajax 容器-->
            </div>
            <!-- start: subview 容器 -->
            <div class="subviews">
                <div class="subviews-container"></div>
            </div>
            <!-- end: subview 容器 -->
        </div>
        <!-- end: 页面 -->
    </div>
    <!-- end: 主体内容 -->
    <!-- start: FOOTER -->


    <!-- end: FOOTER -->
    <!-- start: 子窗口 -->

    <!-- end: 子窗口 -->
    <!-- start: export-iframe -->
    <iframe id="export-iframe" class="dn"></iframe>
    <!-- end: export-iframe -->
    <div class="panel panel-white wait-tip hide">
        <div class="panel-body">
            <i class="fa fa-circle-o-notch fa-spin"></i> 数据加载中,请稍候...
        </div>
    </div>
    <div class="modal-backdrop fade in hide" style="z-index: 1050;"></div>
</div>

<img class="image-preview hide">
<div id="importload_back" style="display: none;"></div>
<div id="importload" style="display: none;">
    <div style="width: 100%;float: left;height: 40px;line-height: 40px;border-bottom: 2px solid #cccccc;">
        <div style="float: left;color: #448db8;font-size: 16px;font-weight: bold;padding-left: 15px;">导入数据</div>
        <div style="float: right;color: #a2a2a2;font-size: 14px;padding-right: 15px;">窗口数据导入完成之后自动关闭</div>
    </div>
    <div id="importcontent" style="width: 350px;float: left;margin-top: 10px;padding-left: 20px;">
        &nbsp;
    </div>
    <div style="float: left;margin-top: 10px;padding-top:50px;padding-left: 10px;">
        <img src="/resources/images/sysimport.gif"/>
    </div>
</div>
<%--<div id="loader-wrapper">--%>
<%--<h2></h2>--%>
<%--<div id="loader"></div>--%>
<%--<div class="loader-section section-left"></div>--%>
<%--<div class="loader-section section-right"></div>--%>
<%--</div>--%>
<!-- start: 必要脚本 -->


<!-- jquery-ui -->
<script src="/resources/plugins/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>


<!-- blockUI -->
<script src="/resources/plugins/blockUI/jquery.blockUI.js"></script>


<!-- 单选/多选 插件 -->
<script src="/resources/plugins/iCheck/jquery.icheck.min.js"></script>


<!-- 下拉插件 -->
<script src="/resources/plugins/select2-master/dist/js/select2.min.js"></script>


<!-- jquery.cookie -->
<script src="/resources/plugins/jquery-cookie/jquery.cookie.js"></script>
<!-- end: 必要脚本 -->
<!-- 滚动条 -->


<!-- 滚动条 -->
<script src="/resources/plugins/perfect-scrollbar/src/jquery.mousewheel.js"></script>
<script src="/resources/plugins/perfect-scrollbar/src/perfect-scrollbar.js"></script>
<!-- 提示框 -->


<!-- 提示框 -->
<script src="/resources/plugins/bootbox/bootbox.min.js"></script>
<!-- moment -->


<!-- 时间工具 -->
<script src="/resources/plugins/moment/min/moment.min.js"></script>
<script src="/resources/plugins/moment/locale/zh-cn.js"></script>
<!-- 表单验证 -->


<!-- 表单验证 -->
<script src="/resources/plugins/jQuery-Validation-Engine-master/js/jquery.validationEngine.js"></script>
<script>
    function getCookie(name)//取cookies函数
    {
        var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
        if (arr != null) return unescape(arr[2]);
        return null;
    }

    try {
        if (getCookie('jdLanguage') == 'en') {
            document.write('<scr' + 'ipt src="/resources/plugins/jQuery-Validation-Engine-master/js/languages/jquery.validationEngine-en.js"></scr' + 'ipt>');
        } else {
            document.write('<scr' + 'ipt src="/resources/plugins/jQuery-Validation-Engine-master/js/languages/jquery.validationEngine-zh_CN.js"></scr' + 'ipt>');
        }
    } catch (e) {
        document.write('<scr' + 'ipt src="/resources/plugins/jQuery-Validation-Engine-master/js/languages/jquery.validationEngine-zh_CN.js"></scr' + 'ipt>');
    }

</script>
<!-- 日期插件 -->


<!-- 日期插件 -->
<script src="/resources/plugins/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<!-- ztree -->


<!-- ztree -->
<script type="text/javascript" src="/resources/plugins/zTree_v3/js/jquery.ztree.all-3.5.min.js"></script>
<!-- 图片预览 -->


<!-- 图片预览 -->
<script src="/resources/plugins/viewer-master/dist/viewer.min.js"></script>
<!-- 弹框 -->


<!-- 弹出框 -->

<script src="/resources/plugins/sweetalert-0.5.x/lib/sweet-alert.js"></script>
<!-- 文件上传 -->


<!-- 文件上传 -->
<!--[if lt IE 10]>
<script src="/resources/plugins/uploadify/jquery.uploadify.min.js"></script>
<![endif]-->
<!--[if gte IE 10]><!-->
<script src="/resources/plugins/uploadifive/jquery.uploadifive.min.js"></script>
<script src="/resources/js/content-type.js"></script>
<!--<![endif]-->
<!-- 移动端 -->


<!-- jquery.touchSwipe 手势 -->
<script src="/resources/plugins/TouchSwipe/jquery.touchSwipe.min.js"></script>


<!-- jquery.velocity 动画插件 -->
<script src="/resources/plugins/velocity/jquery.velocity.min.js"></script>


<!-- 通知插件 -->
<script src="/resources/plugins/toastr/toastr.js"></script>
<!-- 框架 -->
<script src="/resources/js/syscode_init.js"></script>

<script src="/resources/js/main.js"></script>
<script src="/resources/js/frame-tool.js"></script>
<script src="/resources/js/language.js"></script>
<script type="text/javascript">
    /*查询显示中英文--start*/
    function getCookie(name) {
        var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
        if (arr != null) return unescape(arr[2]);
        return null;
    }

    var grzxstr = "";//个人中心
    var isquit = "";//确定要退出吗?
    var cookielang = getCookie("jdLanguage");
    if (cookielang == "en") {
        grzxstr = "Personal Center";
        isquit = "Are you sure you want to quit?";
    } else {
        grzxstr = "个人中心";
        isquit = "确定要退出吗?";
    }
    /*查询显示中英文--end*/

    var haveStudySec = false;//首页是分阶段菜单


    codes.put('topStageMenu_code_html_1', '1', '首页');
    codes.put('topStageMenu_code_html_2', '2', '测试');
    codes.put('topStageMenu_code_html_3', '3', '统计报告');

    function getLeftStageMenuList() {

        if (tool.choseTopStageMenu == '2') {
            _sysCode = [{
                "lbmc": "",
                "notes": "fa fa-university",
                "sfsy": "",
                "sjdm": "",
                "wid": "",
                "zdbm": "3",
                "zdcc": "",
                "zdlb": "",
                "zdmc": "高等教育1",
                "zdpx": "",
                "zds": 0
            }, {
                "lbmc": "",
                "notes": "fa fa-university",
                "sfsy": "",
                "sjdm": "",
                "wid": "",
                "zdbm": "6",  //leftStageMenu
                "zdcc": "",
                "zdlb": "",
                "zdmc": "高等教育2",
                "zdpx": "",
                "zds": 0
            }];
        } else {

            _sysCode = [{
                "lbmc": "",
                "notes": "fa fa-university",
                "sfsy": "",
                "sjdm": "",
                "wid": "",
                "zdbm": "3",
                "zdcc": "",
                "zdlb": "",
                "zdmc": "高等教育3",
                "zdpx": "",
                "zds": 0
            }, {
                "lbmc": "",
                "notes": "fa fa-university",
                "sfsy": "",
                "sjdm": "",
                "wid": "",
                "zdbm": "6",
                "zdcc": "",
                "zdlb": "",
                "zdmc": "高等教育4",
                "zdpx": "",
                "zds": 0
            }];
        }
        return _sysCode;
    }

    var sysCode = codes.getSysCodeByZdlb('topStageMenu_code_html');

    var home_url = '';
    if (home_url == null || home_url == '') {
        home_url = basePath + '/listDrafts.html';
    }
    $(document).ready(function () {
        $('body').addClass('loaded');//关闭加载层
        tool.loginUser = {
            "userName": "陈功锁",
            "departName": "陈功锁",
            "departType": "24",
            "departId": "240002192",
            "userLoginId": "chengongsuo"
        }
        tool.userloginid = 'chengongsuo';
        tool.usertype = '1, 2, 3, 4, 5';
        Main.init();
        // if (stageMenu) {
        //     loadStageMenuCookie();
        // }
        var $contentMain = $('#content-main');
        //tabmodel && 不分阶段菜单
        var isIE8 = false;
        if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
            var ieversion = new Number(RegExp.$1);
            if (ieversion <= 8) {
                isIE8 = true;
            }
        }
        if (tabModel && !stageMenu) {
            if (isIE8) {
                var e = window, a = 'inner';
                if (!('innerWidth' in window)) {
                    a = 'client';
                    e = document.documentElement || document.body;
                }
                $('.main-container').height(e[a + 'Height'] - 50);
            }
            $('.toolbar').remove();
            if (isIE8) {
                $contentMain.css('height', $contentMain.parent().height() - 38);
            } else {
                $contentMain.css('height', 'calc(100% - 38px)');
            }
        } else {
            if (isIE8) {
                $contentMain.css('height', $contentMain.parent().height() - 78);
            } else {
                $contentMain.css('height', 'calc(100% - 78px)');
            }
        }
        if (tabModel) {
            $('.home-btn').click(function () {
                addTab(home_url, 1, grzxstr, false);
            });
        } else {
            $('.home-btn').click(function () {
                Main.ajaxLoaderUrl(home_url, null, grzxstr, '个人信息、日程安排、消息提醒');
            });
        }
        $('.home-btn').click();
        //加载菜单

        // function MenuItem(checked, childMenuCount, child, depth, leftStageMenu, menuicon, menuid, menuname, menunameforen, menupath, nodeid, ordernum, share2enterprise, state, subtitle, sysmenu, topStageMenu, upmenuid){
        //     this.checked = checked;
        //     this.childMenuCount = childMenuCount;
        //     this.child = child;
        //     this.depth = depth;
        //     this.leftStageMenuList
        //
        // }
        // var menus = new Array();
        // menus[0] = new MenuItem();

        // var temp = menus;

        var temp = $.parseJSON('[{"checked":"","childMenuCount":8,"chlid":[],"depth":2,"leftStageMenu":"3","menuicon":"fa fa-adjust","menuid":"000065","menuname":"学生信息管理","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":190,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"2","upmenuid":"000"},{"checked":"","childMenuCount":6,"chlid":[],"depth":2,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000054","menuname":"家庭经济困难学生管理","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":180,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000"},{"checked":"","childMenuCount":4,"chlid":[],"depth":2,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071","menuname":"国家奖助学金","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":160,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000"},{"checked":"","childMenuCount":5,"chlid":[],"depth":2,"leftStageMenu":"1","menuicon":"fa fa-envelope","menuid":"000021","menuname":"消息管理","menunameforen":"","menupath":"","nodeid":"","ordernum":16,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000"},{"checked":"","childMenuCount":9,"chlid":[],"depth":2,"leftStageMenu":"1,2,3,4,5,6,7","menuicon":"fa fa-cogs","menuid":"000019","menuname":"系统管理","menunameforen":"","menupath":"","nodeid":"","ordernum":15,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000"},{"checked":"","childMenuCount":12,"chlid":[],"depth":3,"leftStageMenu":"1,2,3,4,5,6,7","menuicon":"fa fa-file","menuid":"000019014","menuname":"部门管理","menunameforen":"","menupath":"","nodeid":"","ordernum":100,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000019"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"1,2,3,4,5,6","menuicon":"fa fa-file","menuid":"000019018","menuname":"修改密码","menunameforen":"","menupath":"/s/id/idUser/updatePwd","nodeid":"","ordernum":2,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000019"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"1,2,3,4,5,6,7","menuicon":"fa fa-file","menuid":"000019014002","menuname":"组织机构管理","menunameforen":"","menupath":"/s/system/depart/excute","nodeid":"","ordernum":90,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000019014"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"1,2,3,4,5,6","menuicon":"fa fa-file","menuid":"000019014011","menuname":"班级管理","menunameforen":"","menupath":"/listDrafts.html","nodeid":"_sczz","ordernum":6,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000019014"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"1","menuicon":"fa fa-file","menuid":"000021002","menuname":"用户列表","menunameforen":"","menupath":"/list.html","nodeid":"","ordernum":100,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000021"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"1","menuicon":"fa fa-file","menuid":"000021001","menuname":"更新密码","menunameforen":"","menupath":"/updatePwd.html","nodeid":"","ordernum":70,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000021"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"1","menuicon":"fa fa-file","menuid":"000021003","menuname":"草稿","menunameforen":"","menupath":"/openCreate.html","nodeid":"","ordernum":50,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000021"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"1","menuicon":"fa fa-file","menuid":"000021004","menuname":"详情","menunameforen":"","menupath":"/detail.html","nodeid":"","ordernum":10,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"1","upmenuid":"000021"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000054002","menuname":"辅导员审核","menunameforen":"","menupath":"/s/biz/gxpksk/list?mainlist_type=pklist","nodeid":"_sczz","ordernum":70,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000054"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"3","menuicon":"fa fa-adjust","menuid":"000065001","menuname":"在校生信息管理","menunameforen":"","menupath":"/listDrafts.html","nodeid":"_sczz","ordernum":100,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000065"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000065009","menuname":"毕业生信息管理","menunameforen":"","menupath":"/s/biz/gxXsxx/list?mainlist_type=2","nodeid":"_sczz","ordernum":80,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000065"},{"checked":"","childMenuCount":0,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071004","menuname":"评语模板管理","menunameforen":"","menupath":"/s/biz/zxjpy/list","nodeid":"_sczz","ordernum":200,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071"},{"checked":"","childMenuCount":6,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071001","menuname":"国家奖学金","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":160,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071"},{"checked":"","childMenuCount":7,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071002","menuname":"国家励志奖学金","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":150,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071"},{"checked":"","childMenuCount":7,"chlid":[],"depth":3,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071003","menuname":"国家助学金","menunameforen":"","menupath":"","nodeid":"_sczz","ordernum":140,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071001005","menuname":"辅导员审核","menunameforen":"","menupath":"/s/biz/gxGjjxj/list","nodeid":"_sczz","ordernum":70,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071001"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071002005","menuname":"辅导员审核","menunameforen":"","menupath":"/s/biz/gxLzjxjZxsq/list","nodeid":"_sczz","ordernum":70,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071002"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071003005","menuname":"辅导员审核","menunameforen":"","menupath":"/s/biz/gxGjZxj/list","nodeid":"_sczz","ordernum":70,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071003"},{"checked":"","childMenuCount":0,"chlid":[],"depth":4,"leftStageMenu":"6","menuicon":"fa fa-adjust","menuid":"000071003007","menuname":"资金发放","menunameforen":"","menupath":"/s/biz/gxGjZxjZjff/listZjff","nodeid":"_sczz","ordernum":50,"share2enterprise":"","state":"1","subtitle":"","sysmenu":"","topStageMenu":"3","upmenuid":"000071003"}]');
        var ispush = false;
        //整理格式
        if (temp != null && temp.length > 0) {
            for (var i = 0; i < temp.length; i++) {
                ispush = false;
                if (temp[i].depth == '2') {//一级菜单
                    tool.menuList.push(temp[i]);
                } else if (temp[i].depth == '3') {//二级菜单
                    for (var j = 0; j < tool.menuList.length; j++) {
                        if (tool.menuList[j].menuid == temp[i].upmenuid) {
                            tool.menuList[j].chlid.push(temp[i]);
                            ispush = true;
                        }
                    }
                    if (!ispush) {
                        tool.menuList.push(temp[i]);
                    }
                } else if (temp[i].depth == '4') {//三级菜单
                    for (var j = 0; j < tool.menuList.length; j++) {
                        if (temp[i].upmenuid.substr(0, tool.menuList[j].menuid.length) == tool.menuList[j].menuid) {
                            for (var n = 0; n < tool.menuList[j].chlid.length; n++) {
                                if (tool.menuList[j].chlid[n].menuid == temp[i].upmenuid) {
                                    tool.menuList[j].chlid[n].chlid.push(temp[i]);
                                    ispush = true;
                                }
                            }
                            if (!ispush) {
                                tool.menuList.push(temp[i]);
                            }
                        }
                    }
                } else if (temp[i].depth == '5') {//四级菜单
                    for (var j = 0; j < tool.menuList.length; j++) {
                        if (temp[i].upmenuid.substr(0, tool.menuList[j].menuid.length) == tool.menuList[j].menuid) {//检查菜单是否属于该一级菜单
                            for (var n = 0; n < tool.menuList[j].chlid.length; n++) {
                                if (temp[i].upmenuid.substr(0, tool.menuList[j].chlid[n].menuid.length) == tool.menuList[j].chlid[n].menuid) {//检查菜单是否属于当前检查菜单二级菜单
                                    for (var m = 0; m < tool.menuList[j].chlid[n].chlid.length; m++) {
                                        if (tool.menuList[j].chlid[n].chlid[m].menuid == temp[i].upmenuid) {
                                            tool.menuList[j].chlid[n].chlid[m].chlid.push(temp[i]);
                                            ispush = true;
                                        }
                                    }
                                }
                            }
                            if (!ispush) {
                                tool.menuList.push(temp[i]);
                            }
                        }
                    }
                }
            }
        }
        // if (!stageMenu) {
        //     loadMenuByStageMenu();
        // }
        if (stageMenu) {//分阶段菜单
            $('.no-stage-menu').hide();
            $('.stage-menu-box').removeClass('hide');
            //加载顶部菜单
            if (sysCode != null && sysCode.length > 0) {
                $('#stage-menu').html('<ul class="stage-menu"></ul>');
                $('#stage-menu').css('margin-top', '-10px');
                for (var i = 0; i < sysCode.length; i++) {
                    for (var j = 0; j < tool.menuList.length; j++) {
                        if (showAllStageMenu || (tool.menuList[j].topStageMenu != null && tool.menuList[j].topStageMenu.indexOf(sysCode[i].id) > -1)) {
                            $('#stage-menu ul').append('<li><a data-id="' + sysCode[i].id + '" href="javascript:void(0)">' + sysCode[i].value + '</a></li>');
                            break;
                        }
                    }
                }
                $('.stage-menu a').click(function () {
                    $('.stage-menu a').removeClass('active');
                    $(this).addClass('active');
                    tool.choseTopStageMenu = $(this).attr('data-id');
                    loadLeftCode();
                });
                if (tool.choseTopStageMenu != '' && $('#stage-menu ul a[data-id="' + tool.choseTopStageMenu + '"]').length != 0) {
                    $('#stage-menu ul a[data-id="' + tool.choseTopStageMenu + '"]').click();
                } else {
                    $('#stage-menu ul a:eq(0)').click();
                }
            }
        } else {
            // $('.current-user').hide();
        }
        // initrole();
    });

    //加载左侧菜单
    function loadLeftCode() {
        $('.stage-menu-btn-group .dropdown-menu').html('');
        tool.leftStageMenuList = getLeftStageMenuList();
        initLeftMenu();
    }

    function initLeftMenu() {
        haveStudySec = false;
        if (tool.choseTopStageMenu != '1') {//如果是首页,检查首页下所有顶级菜单有无勾选学段信息
            for (var j = 0; j < tool.menuList.length; j++) {
                if (!isBlank(tool.menuList[j].leftStageMenu)) {
                    haveStudySec = true;
                }
            }
        } else {
            haveStudySec = false;
        }
        if (tool.leftStageMenuList != null && tool.leftStageMenuList.length > 0 && haveStudySec) {
            for (var i = 0; i < tool.leftStageMenuList.length; i++) {
                for (var j = 0; j < tool.menuList.length; j++) {
                    if (!showAllLeftStageMenu
                        || (tool.menuList[j].topStageMenu.indexOf($('#stage-menu').find('a.active').attr('data-id')) > -1
                            && tool.menuList[j].leftStageMenu.indexOf(tool.leftStageMenuList[i].zdbm) > -1)) {
                        $('.stage-menu-btn-group .dropdown-menu')
                            .append('<li><a data-id="' + tool.leftStageMenuList[i].zdbm + '" href="javascript:void(0)"><i class="' + tool.leftStageMenuList[i].notes + ' pr10"></i>' + tool.leftStageMenuList[i].zdmc + '</a></li>');
                        break;
                    }
                }
            }

            $('.stage-menu-btn-group .dropdown-menu a').click(function () {
                tool.choseLeftStageMenu = $(this).attr('data-id');
                $('.stage-menu-btn-group > a').html($(this).html() + ' <span class="caret"></span>');
                $('.stage-menu-btn-group > a > i').addClass('stage-menu-i');
                loadMenuByStageMenu();
            });
            //默认选中上一个学段
            if (tool.choseLeftStageMenu != '' && $('.stage-menu-btn-group ul a[data-id="' + tool.choseLeftStageMenu + '"]').length != 0) {
                $('.stage-menu-btn-group ul a[data-id="' + tool.choseLeftStageMenu + '"]').click();
            } else {
                $('.stage-menu-btn-group ul a:eq(0)').click();
            }
        }
        if (!haveStudySec) {
            $('.stage-menu-btn-group > a').html('<i class="fa fa-home pr10 stage-menu-i"></i>' + grzxstr);
            $('.stage-menu-btn-group > a > i').addClass('stage-menu-i');
            loadMenuByStageMenu();
            if (tabModel) {
                $('.stage-menu-btn-group > a').click(function () {
                    if (!haveStudySec) {
                        addTab(home_url, 1, grzxstr, false);
                    }
                });
            } else {
                $('.stage-menu-btn-group > a').click(function () {
                    if (!haveStudySec) {
                        Main.ajaxLoaderUrl(home_url, null, grzxstr, '个人信息、日程安排、消息提醒');
                    }
                });
            }
        }
    }

    /**
     * 将选择的阶段菜单放到cookie
     */
    function setStageMenuCookie() {
        var _stageMenu = new Object;
        _stageMenu.choseLeftStageMenu = tool.choseLeftStageMenu;
        _stageMenu.choseTopStageMenu = tool.choseTopStageMenu;
        $.cookie("_stage_menu_" + tool.loginUser.userLoginId, JSON.stringify(_stageMenu), {expires: 365, path: '/'});
    }

    /**
     * 加载cookie中存放的用户上次选择阶段菜单
     */
    function loadStageMenuCookie() {
        if ($.cookie) {
            if ($.cookie("_stage_menu_" + tool.loginUser.userLoginId)) {
                var _stageMenu = jQuery.parseJSON($.cookie("_stage_menu_" + tool.loginUser.userLoginId));
                tool.choseLeftStageMenu = _stageMenu.choseLeftStageMenu;
                tool.choseTopStageMenu = _stageMenu.choseTopStageMenu;
            }
        }
    }

    /**
     * 根据选择的阶段加载菜单
     */
    function loadMenuByStageMenu() {
        if (stageMenu) {
            setStageMenuCookie();
        }
        $('.main-navigation-menu').html('loading...');
        var nav_html = '';
        if (tool.menuList != null && tool.menuList.length > 0) {
            for (var i = 0; i < tool.menuList.length; i++) {
                if (!stageMenu || (tool.menuList[i].leftStageMenu.indexOf(tool.choseLeftStageMenu) > -1 &&
                    tool.menuList[i].topStageMenu.indexOf(tool.choseTopStageMenu) > -1) ||
                    (!haveStudySec && tool.menuList[i].topStageMenu.indexOf(tool.choseTopStageMenu) > -1)) {
                    if (tool.menuList[i].chlid != null && tool.menuList[i].chlid.length > 0) {//如果有子菜单
                        //一级菜单
                        nav_html += '<li><a href="javascript:void(0)"><i class="' + tool.menuList[i].menuicon + '"></i><span class="title">' + tool.menuList[i].menuname + '</span><i class="icon-arrow"></i></a><ul class="sub-menu">';
                        nav_html += '<li><a class="min-title" href="javascript:void(0)"><span class="title">' + tool.menuList[i].menuname + '</span></a></li>';
                        for (var j = 0; j < tool.menuList[i].chlid.length; j++) {
                            if (!stageMenu || (tool.menuList[i].chlid[j].leftStageMenu.indexOf(tool.choseLeftStageMenu) > -1 && tool.menuList[i].chlid[j].topStageMenu.indexOf(tool.choseTopStageMenu) > -1) ||
                                (!haveStudySec && tool.menuList[i].chlid[j].topStageMenu.indexOf(tool.choseTopStageMenu) > -1)) {
                                if (tool.menuList[i].chlid[j].chlid != null && tool.menuList[i].chlid[j].chlid.length > 0) {
                                    //二级菜单
                                    nav_html += '<li><a href="javascript:void(0)"><span class="title">' + tool.menuList[i].chlid[j].menuname + '</span><i class="icon-arrow"></i></a><ul class="sub-menu">';
                                    for (var n = 0; n < tool.menuList[i].chlid[j].chlid.length; n++) {
                                        if ((tool.menuList[i].chlid[j].chlid[n].leftStageMenu.indexOf(tool.choseLeftStageMenu) > -1 &&
                                            tool.menuList[i].chlid[j].chlid[n].topStageMenu.indexOf(tool.choseTopStageMenu) > -1) ||
                                            (!haveStudySec && tool.menuList[i].chlid[j].chlid[n].topStageMenu.indexOf(tool.choseTopStageMenu) > -1) || !stageMenu) {
                                            //三级菜单
                                            if (tool.menuList[i].chlid[j].chlid[n].chlid != null && tool.menuList[i].chlid[j].chlid[n].chlid.length > 0) {
                                                nav_html += '<li><a href="javascript:void(0)"><span class="title">' + tool.menuList[i].chlid[j].chlid[n].menuname + '</span><i class="icon-arrow"></i></a><ul class="sub-menu">';
                                                //四级菜单
                                                for (var m = 0; m < tool.menuList[i].chlid[j].chlid[n].chlid.length; m++) {
                                                    nav_html += '<li><a class="J_menuItem" data-index="' + tool.menuList[i].chlid[j].chlid[n].chlid[m].menuid + '" href="' + getMenuBasePath(tool.menuList[i].chlid[j].chlid[n].chlid[m]) + '" menuid="' + tool.menuList[i].chlid[j].chlid[n].chlid[m].menuid + '"><span class="title">' + tool.menuList[i].chlid[j].chlid[n].chlid[m].menuname + '</span></a></li>';
                                                }
                                                nav_html += '</ul></li>';
                                            } else {
                                                nav_html += '<li><a class="J_menuItem" data-index="' + tool.menuList[i].chlid[j].chlid[n].menuid + '" href="' + getMenuBasePath(tool.menuList[i].chlid[j].chlid[n]) + '" menuid="' + tool.menuList[i].chlid[j].chlid[n].menuid + '"><span class="title">' + tool.menuList[i].chlid[j].chlid[n].menuname + '</span></a></li>';
                                            }
                                        }
                                    }
                                    nav_html += '</ul></li>';
                                } else {
                                    nav_html += '<li><a class="J_menuItem" data-index="' + tool.menuList[i].chlid[j].menuid + '" href="' + getMenuBasePath(tool.menuList[i].chlid[j]) + '" menuid="' + tool.menuList[i].chlid[j].menuid + '"><span class="title">' + tool.menuList[i].chlid[j].menuname + '</span></a></li>';
                                }
                            }
                        }
                        nav_html += '</ul></li>';
                    } else {
                        nav_html += '<li><a class="J_menuItem" data-index="' + tool.menuList[i].menuid + '" href="' + getMenuBasePath(tool.menuList[i]) + '" menuid="' + tool.menuList[i].menuid + '"><i class="' + tool.menuList[i].menuicon + '"></i><span class="title">' + tool.menuList[i].menuname + '</span></a></li>';
                    }
                }
            }
        }
        $('.main-navigation-menu').html(nav_html);
        Main.runNavigationMenu();
    }

    /**
     * 获取菜单访问地址
     * @param menu 菜单 object
     * @returns {string} url
     */
    function getMenuBasePath(menu) {
        if (isBlank(menu.nodeid)) {
            return basePath + menu.menupath;
        } else {
            return menu.nodeid + menu.menupath;
        }
    }


    /*切换角色--start*/
    function initrole() {//初始化用户所有角色
        $.post('/s/ajax/getuserdepart', {'userloginid': 'chengongsuo'}, function (data) {
            var i = 0;
            var htm = '';
            $(data).each(function (a) {
                i++;
                if (data[a].id != '16092810154391713426')
                    htm += '<li>' +
                        '<a href="javascript:void(0)" onclick="changerole(\'' + data[a].id + '\')" class="home-btn" data-localize="jdframe.b">切换至' + data[a].caption + '</a>' +
                        '</li>';
            });
            if (i > 1) {
                $('#changerole').find('li:first').after(htm);
            }
        });

    }

    function changerole(userid) {
        $.post('/identity/ajaxlogin.action', {
            'loginType': '',
            'act': 'ln_changge',
            'userloginid': 'chengongsuo',
            'userpwd': 'woshimima',
            'userid': userid
        }, function (data) {
            window.location.href = '/identity/index.action';
        });

    }

    /*切换角色--end*/

    if ('false' != 'null') {
        /*验证密码强度(此处密码为假密码-在后台验证处理过)--start*/
        var password = 'mimapwd987123';
        var to_student = 'false';
        var model_id = null;
        if ((password == '1' || password == '2') && "true" != to_student) {
            var ts = "";
            if (password == '1') {
                ts = "您的密码还是初始密码，请点击确定按钮去修改密码";
            } else {
                ts = "您的密码强度过低，请点击确定按钮去修改密码";
            }
            var options = {};
            options.remote = '/s/id/idUser/updatePwd';
            model_id = tool.openModal(options, '80%', true);
        }

        function closePass() {
            $('#' + model_id).modal('hide');
        }

        /*验证密码强度--end*/
    }



    /*是否控制用户最大在线时间--start*/
    var times_login;
    var times_login_time_s = '';
    var times_login_time = -1;

    function times_login_out() {
        clearTimeout(times_login);
        if (times_login_time == -1) times_login_time = parseInt(times_login_time_s);
        else times_login_time--;
        if (times_login_time == 0) {
            logOut();
        } else {
            var times_login_time_se = parseInt(times_login_time / 60);
            if (times_login_time_se > 0) {
                var s = '<font color="yellow">当前登录受限：' + times_login_time_se + '分' + times_login_time % 60 + '秒后自动退出</font>';
                $('#times_login').html(s);

            } else {
                var s = '<font color="yellow">当前登录受限：' + times_login_time + '秒后自动退出</font>';
                $('#times_login').html(s);

            }
            $.get(basePath + "/times.jsp", function () {
            });
            times_login = setTimeout('times_login_out()', 1000);
        }
    }

    if (times_login_time_s != '' && times_login_time_s != null) times_login_out();
    /*是否控制用户最大在线时间--end*/

    /*退出登录--start*/
    var iscas = false;

    function execLogout() {
        tool.alertConfirm(isquit, '', function () {
            logOut();
        });

    }

    function logOut() {
        $.get("../identity/ajaxlogin.action?act=logout", {
            q: (new Date()).getTime(),
            userloginid: 'chengongsuo'
        }, function (data) {
            data = eval("(" + data + ")");
            if (data.msg == 'success') {
                if (iscas && window.location.href.indexOf('index.action') != -1) {
                    window.location = 'http://127.0.0.1:8089/out';
                } else {
                    window.location = window.location.href;
                }
            } else {
                tool.alert(data.msg);
            }
        });
    }

    /*退出登录--end*/
</script>


</body>
<!-- end: BODY -->
</html>